package cn.dz.domain.mp.po;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName UserInfo
 * @package: cn.dz.domain.mp.po
 * @Description TODO
 * @Author dz
 * @Date 2025/1/10 12:33
 * @Version 1.0
 **/
@Data
@Builder
public class UserInfo {
    private Integer age;
    private String intro;
    private String gender;

    // 无参构造函数
    public UserInfo() {}

    // 带参构造函数
    public UserInfo(Integer age, String intro, String gender) {
        this.age = age;
        this.intro = intro;
        this.gender = gender;
    }

    // 手动添加静态 .of() 方法
    public static UserInfo of(Integer age, String intro, String gender) {
        return UserInfo.builder()
                .age(age)
                .intro(intro)
                .gender(gender)
                .build();
    }
}
